<template>
    <div>
          <h2>学校名称：{{schoolName}}</h2>
          <h2>学校地址：{{address}}</h2>
          <button @click="showTips">点我看提示</button>
          <hr/>
          <HelloTest/>
          <hr>
        </div>
</template>

<script>
  const HelloTest ={
      template:`
        <div>
          <h2>欢迎：{{name}}</h2>
        </div>
      `,
      data(){
        return {
          name:'大志强',
        }
      }
    }
  export default {
        name:'MySchool',
        data(){
          return {
            schoolName:'临沂大学',
            address:'高新区伯乐路128号'
          }
        },
        components:{
          HelloTest
        },methods: {
          showTips(){
              alert(this.schoolName)
          }
        },
  }
</script>

<style scoped>

</style>